{include file="public/header" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}
<style type="text/css">
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0px;
        margin-top: 0px
    }

    #title span {
        float: right;
    }

    .asdlkjasd {
        background: #1ab394;
        color: #fff
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            {include file="public/topsection"}
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="example">
                        <form class="form-horizontal" method="post">
                            <table data-toggle="table">
                                <thead>
                                <tr>
                                    <th data-align="center">渠道ID</th>
                                    <th data-align="center">新增用户</th>
                                    <th data-align="center">次日留存</th>
                                    <th data-align="center">3日留存</th>
                                    <th data-align="center">4日留存</th>
                                    <th data-align="center">5日留存</th>
                                    <th data-align="center">6日留存</th>
                                    <th data-align="center">7日留存</th>
                                    <th data-align="center">15日留存</th>
                                    <th data-align="center">30日留存</th>
                                </tr>
                                </thead>
                                <tbody id="form">
                                {volist name="data" id="v"}
                                <tr id="id{$v.id}" class="class">
                                    <td>{$v.user_id}</td>
                                    <!--<td><a onclick="member('{$v.user_id}')" style="color:#40BCF7">{$v.name}</a><br/>{if condition='$v.phone'}({$v.phone}){/if}</td>-->
                                    <td>{$v.new_user}</td>
                                    <td>
                                        {if condition='$v.new_user && (strtotime($v.date) + 86400 * 1) < time()'}
                                        {$v.next_day_keep * 100}%
                                        {/if}
                                    </td>
                                    <td>
                                        {if condition='$v.new_user && (strtotime($v.date) + 86400 * 2) < time()'}
                                        {$v.three_day_keep * 100}%
                                        {/if}
                                    </td>
                                    <td>
                                        {if condition='$v.new_user && (strtotime($v.date) + 86400 * 3) < time()'}
                                        {$v.four_day_keep * 100}%
                                        {/if}
                                    </td>
                                    <td>
                                        {if condition='$v.new_user && (strtotime($v.date) + 86400 * 3) < time()'}
                                        {$v.five_day_keep * 100}%
                                        {/if}
                                    </td>
                                    <td>
                                        {if condition='$v.new_user && (strtotime($v.date) + 86400 * 3) < time()'}
                                        {$v.six_day_keep * 100}%
                                        {/if}
                                    </td>
                                    <td>
                                        {if condition='$v.new_user && (strtotime($v.date) + 86400 * 3) < time()'}
                                        {$v.seven_day_keep * 100}%
                                        {/if}
                                    </td>
                                    <td>
                                        {if condition='$v.new_user && (strtotime($v.date) + 86400 * 3) < time()'}
                                        {$v.fifteen_day_keep * 100}%
                                        {/if}
                                    </td>
                                    <td>
                                        {if condition='$v.new_user && (strtotime($v.date) + 86400 * 3) < time()'}
                                        {$v.thirty_day_keep * 100}%
                                        {/if}
                                    </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages">{$page}</div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
{load href="__PLUGINS__iCheck/icheck.min.js"}
{load href="__PLUGINS__iCheck/custom.css"}
<script type="text/javascript">
    function member(id)
    {
        layui.use('layer', function(){
            var layer = layui.layer;
            layer.open({
                title :'预览',
                area: ['100%', '100%'],
                type: 2,
                content: '{:url("member/index")}?search=id&name='+id
            });
        });
    }
</script>